package com.jacksonling.controller;

import com.jacksonling.pojo.OperateLog;
import com.jacksonling.pojo.PageResult;
import com.jacksonling.pojo.Result;
import com.jacksonling.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/log")
public class OperateLogController {

    @Autowired
    private OperateLogService operateLogService;
    @GetMapping("/page")
    public Result logPage(@RequestParam(defaultValue = "1") Integer page,
                          @RequestParam(defaultValue = "10")Integer pageSize){
        PageResult dataList = operateLogService.Page(page, pageSize);
        return Result.success(dataList);
    }
}
